Data and Computer Codes for Results Reported in 
“Do Tax Deferred Accounts Improve Lifecycle Savings? Experimental Evidence”
John Duffy        Yue Li
UC Irvine         SUNY, Albany
duffy@uci.edu   yli49@albany.edu

Program required: Matlab (2018b was used) and Stata (version 16)

##############################################
1.	The programs and data in each subdirectory are organized such that they can be run independently of other parts. However, our analysis is completed using the following order 
a.	Solve the theoretical model using codes in the model subdirectory, i.e., model/T1.m, model/T2.m, model/T3.m. These code are written in Matlab. For a computer equipped with 24 cores,  these codes can typically be executed within approximately 15 hours.
b.	Anaylze the experimental data using codes in the data subdirectory, i.e., data/labdata.do, data/Mturkdata.do. These code are written in Stata, and can be executed in 10 minutes.

##############################################

2.	The model subdirectory contains the Matlab codes used to solve the theoretical model

a. T1.m: find theory predictions for T1
b. T2.m: find theory predictions for T2
c. T3.m: find theory predictions for T3, and produces Appendix Figure C1
The above programs internally call other functions stored in this subdirectory 
d. graph folder: store the output graphs. Appendix Figure C1 is produced using the Matlab code (T3.m). All other figures are produced using Stata codes. 

##############################################
3.	The data subdirectory contains the experimental data and codes used for estimation.

a. labdata.do: Stata codes for analyzing the lab data
This program produces Figures 1, 2, 3, 4 and Appendix Figure C3 (a); generates inputs for Tables 2, 3, 4 and Appendix Table C1, C2, C3, C4
b. Mturkdata.do: Stata codes for analyzing the Mturk data
This program produces Appendix Figure C2, C3 (b); generates inputs for Tables 5, 6 and Appendix Table C3, C5, C6
c. Tables: the excel file converts Stata output to the tables reported in the paper. 
c. data folder: store the experimental data, model predictions, and SCF estimates about household networth. Experimental data is collected by the author, with dictionary listed below. Model predictions are generated by the Matlab codes, and SCF estiamtes are author's calculation from the Survey of Consumer Finances.  
d. graph folder: store all graphs reported in the paper except Figure C1
e. log folder: store the Stata log files
f. output folder: store the Stata output files 
g. labdata_blackwhite.do: revision of labdata.do to make all figures in the main text in black and white colors
 


##############################################
Dictionary for experimental data

participantid_in_session	Subject number in a session
participantcode	unique participant id
participant_current_app_name	Treatment name
participant_current_page_name	Page name
participanttime_started	Time started the experiment
participantvisited	=1
participantmturk_worker_id	Mturk subject information
participantmturk_assignment_id	Mturk subject information
participantpayoff	Experiment final payments
playerid_in_group	Id within group
playerendowment	Current period endowment income
playerbalance_RA	end of period RA balance 
playerbalance_TDA	end of period TDA balance
playertaxable_income	current period taxable income
playertax_paid	current period tax payments
playerafter_tax_income	current period after tax income
playercapital_gains	For T3 only, interest income
playercapital_gains_tax_paid	For T3 only, taxes on interest income
playerpayoff_sign	=1
playerpayoff_dollars	current period payoff dollar part
playerpayoff_cents	current period payoff cent part
playertotal_payoff	cumulative payoff (in cents)
playertotal_payoff_sign	=1
playertotal_payoff_dollars	cumulative payoff dollar part
playertotal_payoff_cents	cumulative payoff cent part
playersequence_payoff	sequence payoff (stop accumulating if the sequence is terminated)
playercontribution	TDA contribution (negative for withdraws)
playerconsumption	current period consumption
playerdefault_contribution	TDA default contribution
playerdeferred_account	0-1 for whether with TDA
playercontribution_choice_start_time	 Start time for contribution decision page
playercontribution_choice_end_time	 Ending time for contribution decision page
playerconsumption_choice_start_time	 Start time for consumption decision page
playerconsumption_choice_end_time	 Ending time for consumption decision page
playeranswer_1	CRT Q1
playeranswer_2	CRT Q2
playeranswer_3	CRT Q3
playeranswer_4	CRT Q4
playerMC_answer_1	Financial literacy Q1
playerMC_answer_2	Financial literacy Q2
playerMC_answer_3	Financial literacy Q3
playerrisk_answer_01	Risk elicitation Q1
playerrisk_answer_02	Risk elicitation Q2
playerrisk_answer_03	Risk elicitation Q3
playerrisk_answer_04	Risk elicitation Q4
playerrisk_answer_05	Risk elicitation Q5
playerrisk_answer_06	Risk elicitation Q6
playerrisk_answer_07	Risk elicitation Q7
playerrisk_answer_08	Risk elicitation Q8
playerrisk_answer_09	Risk elicitation Q9
playerrisk_answer_10	Risk elicitation Q10
playerrisk_payoff	Payoff from risk elicitation task (cents)
playerQ_num_sequences	End of instruction questions
playerQ_num_working_periods	All the answers are the same
playerQ_consumption_1	Because only players who pass the test
playerQ_consumption_2	can continue
playerQ_consumption_3	(they can change answers for unlimited times)
playerQ_sequence_length	
playerQ_remaining_balance	
playerQ_final_earnings	
playerQ_RA_interest	
playerQ_RA_withdraw	
playerQ_RA_tax	
playerQ_TDA_contribute	
playerQ_TDA_withdraw	
playerage	 Age
playerbirthyear	Birth year
playergender	Gender
playerrace	Race
playerincome	Income range
playereducation	Education
playerZIP	zip code
playercomments	any comments
playerpayoff	current period payoff (in cents)
groupid_in_subsession	=1
subsessionround_number	1-35 first sequence, 56-90 second sequence, 110 end of experiment questionnaire
subsessionroll	a random number from 1-10
subsessionendowment	.
subsessionsequence	sequence indicator
subsessionround_in_sequence	Period within a sequence, =55 for end-of-experiment questionnaire
subsessionvalid_round	=0 for end-of-experiment questionnaire, and =1 for valid data entry
subsessionpaid_round	=0 if the round is not paid, and 1 if paid
subsessiondeferred_account	.
sessioncode	session code number
sessionlabel	.
sessionexperimenter_name	.
sessionmturk_HITId	Mturk session info
sessionmturk_HITGroupId	Mturk session info
sessioncomment	.
sessionis_demo	=0
